Object.defineProperty(exports, "__esModule", {
  value: true
});
var _def_TimeUtils = function () {
  function _creator() {}
  _creator.secondsToMinutesSeconds = function (e, t) {
    undefined === t && (t = false);
    var o;
    var n = Math.floor(e / 60);
    var i = Math.floor(e % 60);
    o = i < 10 ? "0" + i : "" + i;
    if (t) {
      return n + "：" + o;
    } else {
      return n + ":" + o;
    }
  };
  _creator.secondsToHMS = function (e) {
    var t = Math.floor(e / 3600);
    var o = Math.floor((e - 3600 * t) / 60);
    var n = Math.floor(e % 60);
    var i = "";
    t < 10 && (i = "0");
    var a = "";
    o < 10 && (a = "0");
    var r = "";
    n < 10 && (r = "0");
    return "" + i + t + ":" + a + o + ":" + r + n;
  };
  _creator.getTodayOfYear = function () {
    var e = new Date();
    var t = new Date(e.getFullYear(), 0, 0);
    var o = e.valueOf() - t.valueOf();
    return Math.floor(o / 864e5);
  };
  _creator.getNowTimeStamp = function () {
    return new Date().getTime();
  };
  _creator.timeStampToDate = function (e) {
    var t = new Date(e);
    return t.getFullYear() + "年" + (t.getMonth() + 1) + "月" + t.getDate() + "日";
  };
  _creator.getNowTimeShow = function () {
    var e = new Date();
    return e.getHours() + ":" + e.getMinutes() + ":" + e.getSeconds();
  };
  _creator.formatTimestamp = function (e) {
    var t = Math.floor(e / 36e5);
    var o = Math.floor(e % 36e5 / 6e4);
    var n = Math.floor(e % 6e4 / 1e3);
    return t.toString().padStart(2, "0") + ":" + o.toString().padStart(2, "0") + ":" + n.toString().padStart(2, "0");
  };
  _creator.isSameDay = function (e, t) {
    var o = new Date(e);
    var n = new Date(t);
    return o.getFullYear() == n.getFullYear() && o.getMonth() == n.getMonth() && o.getDate() == n.getDate();
  };
  _creator.getTimeUntilMidnight = function () {
    var e = new Date();
    return new Date(e.getFullYear(), e.getMonth(), e.getDate() + 1, 0, 0, 0, 0).getTime() - e.getTime();
  };
  return _creator;
}();
exports.default = _def_TimeUtils;